package io.renren.modules.jsf.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.jsf.dao.MembertypeDao;
import io.renren.modules.jsf.entity.MembertypeEntity;
import io.renren.modules.jsf.service.MembertypeService;


@Service("membertypeService")
public class MembertypeServiceImpl extends ServiceImpl<MembertypeDao, MembertypeEntity> implements MembertypeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<MembertypeEntity> page = this.page(
                new Query<MembertypeEntity>().getPage(params),
                new QueryWrapper<MembertypeEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<MembertypeEntity> selectAll() {

        return baseMapper.selectList(null);
    }

}
